package com.example.meizu002.service.impl;

import com.example.meizu002.entity.Goods1;
import com.example.meizu002.mapper.Good1Mapper;
import com.example.meizu002.service.Goods1Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class Goods1ServiceImpl implements Goods1Service {
    @Autowired
   private  Good1Mapper good1Mapper;
    @Override
    public List<Goods1> findAll() {
        List<Goods1> goods1s=good1Mapper.findAll();
        return goods1s;
    }

    @Override
    public void addGoods(Goods1 goods1) {
          good1Mapper.addGoods(goods1);
    }

    @Override
    public void deleteGoods(int id) {
         good1Mapper.deleteGoods(id);
    }

    @Override
    public Goods1 findOne(int id) {

        return good1Mapper.findOne(id);
    }

    @Override
    public void updateGoods(Goods1 goods1) {
               good1Mapper.updateGoods(goods1);
    }
}
